package com.zz.parkingsystem.entity;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 巡查员表
 * @TableName t_inspector
 */
@Data
public class Inspector implements Serializable {
    /**
     * 巡查id
     */
    private Integer insId;

    /**
     * 管理员id
     */
    private Integer adminId;

    /**
     * 设备id
     */
    private Integer pdaId;

    /**
     * 登陆电话
     */
    private String insTel;

    /**
     * 密码
     */
    private String insPassword;

    /**
     * 用户名
     */
    private String insNickname;

    /**
     * 盐值
     */
    private String insSalt;

    /**
     * 0:woman 1：man
     */
    private Integer insGender;

    /**
     * 用户头像
     */
    private String insAvatar;

    /**
     * 0:alive 1:dead
     */
    private Integer insStatus;

    /**
     * 注册时间
     */
    private Date insCreatedTime;

    /**
     * 修改时间
     */
    private Date insUpdatedTime;

    /**
     * 预留varchar字段
     */
    private String reservedVar;

    /**
     * 预留int字段
     */
    private Integer reservedInt;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Inspector other = (Inspector) that;
        return (this.getInsId() == null ? other.getInsId() == null : this.getInsId().equals(other.getInsId()))
            && (this.getAdminId() == null ? other.getAdminId() == null : this.getAdminId().equals(other.getAdminId()))
            && (this.getPdaId() == null ? other.getPdaId() == null : this.getPdaId().equals(other.getPdaId()))
            && (this.getInsTel() == null ? other.getInsTel() == null : this.getInsTel().equals(other.getInsTel()))
            && (this.getInsPassword() == null ? other.getInsPassword() == null : this.getInsPassword().equals(other.getInsPassword()))
            && (this.getInsNickname() == null ? other.getInsNickname() == null : this.getInsNickname().equals(other.getInsNickname()))
            && (this.getInsSalt() == null ? other.getInsSalt() == null : this.getInsSalt().equals(other.getInsSalt()))
            && (this.getInsGender() == null ? other.getInsGender() == null : this.getInsGender().equals(other.getInsGender()))
            && (this.getInsAvatar() == null ? other.getInsAvatar() == null : this.getInsAvatar().equals(other.getInsAvatar()))
            && (this.getInsStatus() == null ? other.getInsStatus() == null : this.getInsStatus().equals(other.getInsStatus()))
            && (this.getInsCreatedTime() == null ? other.getInsCreatedTime() == null : this.getInsCreatedTime().equals(other.getInsCreatedTime()))
            && (this.getInsUpdatedTime() == null ? other.getInsUpdatedTime() == null : this.getInsUpdatedTime().equals(other.getInsUpdatedTime()))
            && (this.getReservedVar() == null ? other.getReservedVar() == null : this.getReservedVar().equals(other.getReservedVar()))
            && (this.getReservedInt() == null ? other.getReservedInt() == null : this.getReservedInt().equals(other.getReservedInt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getInsId() == null) ? 0 : getInsId().hashCode());
        result = prime * result + ((getAdminId() == null) ? 0 : getAdminId().hashCode());
        result = prime * result + ((getPdaId() == null) ? 0 : getPdaId().hashCode());
        result = prime * result + ((getInsTel() == null) ? 0 : getInsTel().hashCode());
        result = prime * result + ((getInsPassword() == null) ? 0 : getInsPassword().hashCode());
        result = prime * result + ((getInsNickname() == null) ? 0 : getInsNickname().hashCode());
        result = prime * result + ((getInsSalt() == null) ? 0 : getInsSalt().hashCode());
        result = prime * result + ((getInsGender() == null) ? 0 : getInsGender().hashCode());
        result = prime * result + ((getInsAvatar() == null) ? 0 : getInsAvatar().hashCode());
        result = prime * result + ((getInsStatus() == null) ? 0 : getInsStatus().hashCode());
        result = prime * result + ((getInsCreatedTime() == null) ? 0 : getInsCreatedTime().hashCode());
        result = prime * result + ((getInsUpdatedTime() == null) ? 0 : getInsUpdatedTime().hashCode());
        result = prime * result + ((getReservedVar() == null) ? 0 : getReservedVar().hashCode());
        result = prime * result + ((getReservedInt() == null) ? 0 : getReservedInt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", insId=").append(insId);
        sb.append(", adminId=").append(adminId);
        sb.append(", pdaId=").append(pdaId);
        sb.append(", insTel=").append(insTel);
        sb.append(", insPassword=").append(insPassword);
        sb.append(", insNickname=").append(insNickname);
        sb.append(", insSalt=").append(insSalt);
        sb.append(", insGender=").append(insGender);
        sb.append(", insAvatar=").append(insAvatar);
        sb.append(", insStatus=").append(insStatus);
        sb.append(", insCreatedTime=").append(insCreatedTime);
        sb.append(", insUpdatedTime=").append(insUpdatedTime);
        sb.append(", reservedVar=").append(reservedVar);
        sb.append(", reservedInt=").append(reservedInt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}